package com.netease.pris.b;

import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;
import com.netease.b.a.d;
import com.netease.d.c;
import com.netease.pris.a.r;
import com.netease.pris.app.e;
import com.netease.pris.atom.n;
import com.netease.pris.provider.ae;
import java.util.ArrayList;

public class a
{
  static boolean a = false;
  public static String b = "con_user";
  public static final String c = "user_name";
  public static final String d = "user_password";
  public static final String e = "user_nick_name";
  public static final String f = "user_remember_password";
  public static final String g = "user_anonymity";
  public static final String h = "software_version";
  public static final String i = "first_login";
  public static final String j = "textmode_dlg";
  public static final String k = "feed_updated";
  public static final String l = "service_url_updated";
  public static final String m = "start_up_time";
  public static final String n = "app_mid";
  static final ArrayList o = new ArrayList();
  private static final int p = -1;
  private static final String q = "last_notification";
  private static final String r = "anonyumous_favorite_count";
  private static final String s = "anonyumous_subscribe_count";
  private static final String t = "last_pris_message_updated";
  private static final String u = "last_offline_cache_notify_size";
  private static final String v = "stat_url";
  private static final String w = "stat_control";
  private static final String x = "dir>";

  static
  {
    o.add("pris_statisticsReport");
    o.add("pris_favoriteGet");
    o.add("pris_favoriteDel");
    o.add("pris_favoriteAdd");
    o.add("pris_illegalReport");
    o.add("pris_subRefresh");
    o.add("pris_subGetSummary");
    o.add("pris_subDel");
    o.add("pris_subAdd");
    o.add("pris_subGet");
    o.add("pris_subRecommend");
    o.add("pris_subList");
    o.add("pris_userModifyPassword");
    o.add("pris_userModifyIcon");
    o.add("pris_userModifyInfo");
    o.add("pris_userGet");
    o.add("pris_coverImage");
    o.add("pris_login");
    o.add("pris_infoGet");
    o.add("pris_SaveSubSequence");
    o.add("pris_font");
    o.add("pris_searchEngine");
    o.add("pris_errReport");
    o.add("pris_shortUrl");
  }

  public static String A()
  {
    return b("pris_subGet", null);
  }

  public static void A(String paramString)
  {
    a("pris_favoriteAdd", paramString);
  }

  public static String B()
  {
    return b("pris_subAdd", null);
  }

  public static void B(String paramString)
  {
    a("pris_favoriteDel", paramString);
  }

  public static String C()
  {
    return b("pris_subDel", null);
  }

  public static void C(String paramString)
  {
    a("pris_favoriteGet", paramString);
  }

  public static String D()
  {
    return b("pris_subGetSummary", null);
  }

  public static void D(String paramString)
  {
    a("pris_statisticsReport", paramString);
  }

  public static String E()
  {
    return b("pris_subRefresh", null);
  }

  public static void E(String paramString)
  {
    a("pris_SaveSubSequence", paramString);
  }

  public static String F()
  {
    return b("pris_illegalReport", null);
  }

  public static void F(String paramString)
  {
    a("pris_font", paramString);
  }

  public static String G()
  {
    return b("pris_infoGet", null);
  }

  public static void G(String paramString)
  {
    a("pris_searchEngine", paramString);
  }

  public static String H()
  {
    return b("pris_favoriteAdd", null);
  }

  public static void H(String paramString)
  {
    a("pris_errReport", paramString);
  }

  public static String I()
  {
    return b("pris_favoriteDel", null);
  }

  public static void I(String paramString)
  {
    a("app_mid", paramString);
  }

  public static String J()
  {
    return b("pris_favoriteGet", null);
  }

  public static void J(String paramString)
  {
    if (a)
      com.netease.d.b.a().a(b, paramString);
    while (true)
    {
      return;
      c.a().a(b, paramString);
    }
  }

  public static String K()
  {
    return b("pris_statisticsReport", null);
  }

  public static String L()
  {
    return b("pris_SaveSubSequence", null);
  }

  public static String M()
  {
    return b("pris_font", null);
  }

  public static String N()
  {
    return b("pris_searchEngine", null);
  }

  public static String O()
  {
    return b("pris_errReport", null);
  }

  public static long P()
  {
    String str = b("service_url_updated", null);
    long l1 = 0L;
    try
    {
      long l2 = Long.parseLong(str);
      l1 = l2;
      label18: return l1;
    }
    catch (Exception localException)
    {
      break label18;
    }
  }

  public static String Q()
  {
    return b("app_mid", null);
  }

  public static long R()
  {
    String str = b("start_up_time", null);
    long l1 = 0L;
    try
    {
      long l2 = Long.parseLong(str);
      l1 = l2;
      label18: return l1;
    }
    catch (Exception localException)
    {
      break label18;
    }
  }

  public static boolean S()
  {
    int i1 = 1;
    long l1 = System.currentTimeMillis();
    while (true)
    {
      try
      {
        long l2 = P();
        long l3 = R();
        if (l2 > l3)
          return i1;
        String[] arrayOfString = new String[1];
        arrayOfString[0] = "count(*)";
        Cursor localCursor = d.h().a().getContentResolver().query(ae.f, arrayOfString, " select count(*) from config where type = -1", null, null);
        if (localCursor == null)
          continue;
        boolean bool = localCursor.moveToFirst();
        if (!bool)
          continue;
        try
        {
          long l4 = o.size();
          long l5 = localCursor.getLong(localCursor.getColumnIndex("count(*)"));
          if (l4 > l5)
            break label253;
          i2 = i1;
          i1 = i2;
          if (localCursor == null)
            continue;
          localCursor.close();
          if (!e.e)
            continue;
          com.netease.g.b.e("PRISConfig", "IsLoadServiceUrl time is:" + (System.currentTimeMillis() - l1));
        }
        catch (Exception localException)
        {
          localException.printStackTrace();
        }
        i1 = 0;
        continue;
      }
      finally
      {
        if (!e.e)
          continue;
        com.netease.g.b.e("PRISConfig", "IsLoadServiceUrl time is:" + (System.currentTimeMillis() - l1));
      }
      label253: int i2 = 0;
    }
  }

  public static void a(int paramInt)
  {
    a("stat_control", String.valueOf(paramInt));
  }

  public static void a(long paramLong)
  {
    a("last_offline_cache_notify_size", String.valueOf(paramLong));
  }

  // ERROR //
  public static void a(Context paramContext, java.util.LinkedList paramLinkedList)
  {
    // Byte code:
    //   0: aload_0
    //   1: ifnull +10 -> 11
    //   4: aload_1
    //   5: invokevirtual 293	java/util/LinkedList:size	()I
    //   8: ifgt +4 -> 12
    //   11: return
    //   12: invokestatic 197	java/lang/System:currentTimeMillis	()J
    //   15: lstore_2
    //   16: aload_0
    //   17: invokestatic 298	com/netease/pris/provider/ac:a	(Landroid/content/Context;)Lcom/netease/pris/provider/ac;
    //   20: invokevirtual 302	com/netease/pris/provider/ac:getWritableDatabase	()Landroid/database/sqlite/SQLiteDatabase;
    //   23: astore 4
    //   25: aload 4
    //   27: invokevirtual 307	android/database/sqlite/SQLiteDatabase:beginTransaction	()V
    //   30: aload_1
    //   31: invokevirtual 293	java/util/LinkedList:size	()I
    //   34: istore 5
    //   36: new 209	java/lang/StringBuilder
    //   39: dup
    //   40: invokespecial 210	java/lang/StringBuilder:<init>	()V
    //   43: astore 6
    //   45: aload 6
    //   47: ldc_w 309
    //   50: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   53: pop
    //   54: aload 6
    //   56: ldc_w 311
    //   59: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   62: pop
    //   63: aload 6
    //   65: ldc_w 313
    //   68: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   71: pop
    //   72: aload 6
    //   74: ldc_w 315
    //   77: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   80: pop
    //   81: aload 6
    //   83: ldc_w 317
    //   86: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   89: pop
    //   90: aload 6
    //   92: ldc_w 319
    //   95: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   98: pop
    //   99: aload 6
    //   101: ldc_w 317
    //   104: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   107: pop
    //   108: aload 6
    //   110: ldc_w 321
    //   113: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   116: pop
    //   117: aload 6
    //   119: ldc_w 317
    //   122: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   125: pop
    //   126: aload 6
    //   128: ldc_w 323
    //   131: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   134: pop
    //   135: aload 6
    //   137: ldc_w 325
    //   140: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   143: pop
    //   144: aload 6
    //   146: ldc_w 327
    //   149: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   152: pop
    //   153: aload 6
    //   155: ldc_w 329
    //   158: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   161: pop
    //   162: aload 4
    //   164: aload 6
    //   166: invokevirtual 222	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   169: invokevirtual 333	android/database/sqlite/SQLiteDatabase:compileStatement	(Ljava/lang/String;)Landroid/database/sqlite/SQLiteStatement;
    //   172: astore 23
    //   174: iconst_0
    //   175: istore 24
    //   177: iload 24
    //   179: iload 5
    //   181: if_icmpge +25 -> 206
    //   184: aload 4
    //   186: aload_1
    //   187: iload 24
    //   189: invokevirtual 337	java/util/LinkedList:get	(I)Ljava/lang/Object;
    //   192: checkcast 339	com/netease/pris/atom/n
    //   195: aload 23
    //   197: invokestatic 342	com/netease/pris/b/a:a	(Landroid/database/sqlite/SQLiteDatabase;Lcom/netease/pris/atom/n;Landroid/database/sqlite/SQLiteStatement;)V
    //   200: iinc 24 1
    //   203: goto -26 -> 177
    //   206: aload 4
    //   208: invokevirtual 345	android/database/sqlite/SQLiteDatabase:setTransactionSuccessful	()V
    //   211: aload 23
    //   213: astore 21
    //   215: aload 4
    //   217: invokevirtual 348	android/database/sqlite/SQLiteDatabase:endTransaction	()V
    //   220: aload 21
    //   222: ifnull +8 -> 230
    //   225: aload 21
    //   227: invokevirtual 351	android/database/sqlite/SQLiteStatement:close	()V
    //   230: getstatic 205	com/netease/pris/app/e:e	Z
    //   233: ifeq -222 -> 11
    //   236: ldc 207
    //   238: new 209	java/lang/StringBuilder
    //   241: dup
    //   242: invokespecial 210	java/lang/StringBuilder:<init>	()V
    //   245: ldc_w 353
    //   248: invokevirtual 216	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   251: invokestatic 197	java/lang/System:currentTimeMillis	()J
    //   254: lload_2
    //   255: lsub
    //   256: invokevirtual 219	java/lang/StringBuilder:append	(J)Ljava/lang/StringBuilder;
    //   259: invokevirtual 222	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   262: invokestatic 226	com/netease/g/b:e	(Ljava/lang/String;Ljava/lang/String;)V
    //   265: goto -254 -> 11
    //   268: astore 20
    //   270: aconst_null
    //   271: astore 21
    //   273: aload 20
    //   275: astore 22
    //   277: aload 22
    //   279: invokevirtual 280	java/lang/Exception:printStackTrace	()V
    //   282: goto -67 -> 215
    //   285: astore 25
    //   287: aload 23
    //   289: astore 21
    //   291: aload 25
    //   293: astore 22
    //   295: goto -18 -> 277
    //
    // Exception table:
    //   from	to	target	type
    //   162	174	268	java/lang/Exception
    //   184	211	285	java/lang/Exception
  }

  public static void a(SQLiteDatabase paramSQLiteDatabase, n paramn, SQLiteStatement paramSQLiteStatement)
  {
    if ((paramSQLiteDatabase == null) || (paramn == null) || (paramSQLiteStatement == null))
      return;
    while (true)
    {
      try
      {
        paramSQLiteStatement.bindString(1, b);
        if (paramn.d() == null)
          break label76;
        paramSQLiteStatement.bindString(2, paramn.d());
        if (paramn.a() == null)
          break label84;
        paramSQLiteStatement.bindString(3, paramn.a());
        paramSQLiteStatement.bindLong(4, -1L);
        paramSQLiteStatement.execute();
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
      break;
      label76: paramSQLiteStatement.bindNull(2);
      continue;
      label84: paramSQLiteStatement.bindNull(3);
    }
  }

  public static void a(String paramString)
  {
    a("user_name", paramString);
  }

  public static void a(String paramString, long paramLong)
  {
    a("dir>" + paramString, String.valueOf(paramLong));
  }

  public static void a(String paramString1, String paramString2)
  {
    if (a)
      com.netease.d.b.a().b(b, paramString1, paramString2);
    while (true)
    {
      return;
      c.a().a(b, paramString1, paramString2);
    }
  }

  public static void a(boolean paramBoolean)
  {
    a("textmode_dlg", Boolean.toString(paramBoolean));
  }

  public static boolean a()
  {
    return Boolean.parseBoolean(b("textmode_dlg", Boolean.toString(true)));
  }

  public static int b()
  {
    String str = b("stat_control", "0");
    try
    {
      int i2 = Integer.parseInt(str);
      i1 = i2;
      return i1;
    }
    catch (Exception localException)
    {
      while (true)
      {
        localException.printStackTrace();
        int i1 = 0;
      }
    }
  }

  public static long b(long paramLong)
  {
    String str = b("last_offline_cache_notify_size", null);
    if (str != null);
    try
    {
      long l1 = Long.parseLong(str);
      paramLong = l1;
      return paramLong;
    }
    catch (NumberFormatException localNumberFormatException)
    {
      while (true)
        localNumberFormatException.printStackTrace();
    }
  }

  public static String b(String paramString1, String paramString2)
  {
    if (a);
    for (String str = com.netease.d.b.a().a(b, paramString1, paramString2); ; str = c.a().b(b, paramString1, paramString2))
      return str;
  }

  public static void b(int paramInt)
  {
    a("anonyumous_favorite_count", String.valueOf(paramInt));
  }

  public static void b(String paramString)
  {
    a("user_nick_name", paramString);
  }

  public static void b(boolean paramBoolean)
  {
    a("user_remember_password", Boolean.toString(paramBoolean));
  }

  public static int c(int paramInt)
  {
    String str = b("anonyumous_favorite_count", null);
    if (str != null);
    try
    {
      int i1 = Integer.parseInt(str);
      paramInt = i1;
      return paramInt;
    }
    catch (Exception localException)
    {
      while (true)
        localException.printStackTrace();
    }
  }

  public static String c()
  {
    return b("user_name", null);
  }

  public static void c(long paramLong)
  {
    a("service_url_updated", Long.toString(paramLong));
  }

  public static void c(String paramString)
  {
    a("user_password", r.b(paramString));
  }

  public static void c(boolean paramBoolean)
  {
    a("user_anonymity", Boolean.toString(paramBoolean));
  }

  public static String d()
  {
    return b("user_nick_name", null);
  }

  public static void d(int paramInt)
  {
    a("anonyumous_subscribe_count", String.valueOf(paramInt));
  }

  public static void d(long paramLong)
  {
    a("start_up_time", Long.toString(paramLong));
  }

  public static void d(String paramString)
  {
    a("last_notification", paramString);
  }

  public static void d(boolean paramBoolean)
  {
    a("first_login", Boolean.toString(paramBoolean));
  }

  public static int e(int paramInt)
  {
    String str = b("anonyumous_subscribe_count", null);
    if (str != null);
    try
    {
      int i1 = Integer.parseInt(str);
      paramInt = i1;
      return paramInt;
    }
    catch (Exception localException)
    {
      while (true)
        localException.printStackTrace();
    }
  }

  public static void e()
  {
    J("user_name");
  }

  public static void e(String paramString)
  {
    a("last_pris_message_updated", paramString);
  }

  public static long f(String paramString)
  {
    String str = b("dir>" + paramString, null);
    if (str != null);
    while (true)
    {
      try
      {
        long l2 = Long.parseLong(str);
        l1 = l2;
        return l1;
      }
      catch (NumberFormatException localNumberFormatException)
      {
        localNumberFormatException.printStackTrace();
      }
      long l1 = -1L;
    }
  }

  public static void f()
  {
    J("user_nick_name");
  }

  public static String g()
  {
    return r.c(b("user_password", null));
  }

  public static void g(String paramString)
  {
    a("stat_url", paramString);
  }

  public static void h()
  {
    J("user_password");
  }

  public static boolean h(String paramString)
  {
    int i1 = 1;
    String str = b("software_version", null);
    if ((str == null) || (str.compareToIgnoreCase(paramString) < 0));
    while (true)
    {
      return i1;
      i1 = 0;
    }
  }

  public static void i(String paramString)
  {
    a("software_version", paramString);
  }

  public static boolean i()
  {
    return Boolean.parseBoolean(b("user_remember_password", Boolean.toString(true)));
  }

  public static String j()
  {
    return b("last_notification", null);
  }

  public static void j(String paramString)
  {
    a("user_anonymity", paramString);
  }

  public static String k()
  {
    return b("last_pris_message_updated", null);
  }

  public static void k(String paramString)
  {
    a("pris_login", paramString);
  }

  public static String l()
  {
    return b("stat_url", null);
  }

  public static void l(String paramString)
  {
    a("pris_coverImage", paramString);
  }

  public static void m(String paramString)
  {
    a("pris_shortUrl", paramString);
  }

  public static boolean m()
  {
    return Boolean.parseBoolean(b("user_anonymity", Boolean.toString(true)));
  }

  public static void n(String paramString)
  {
    a("pris_userGet", paramString);
  }

  public static boolean n()
  {
    return Boolean.parseBoolean(b("first_login", Boolean.toString(true)));
  }

  public static int o()
  {
    String str = b("anonyumous_favorite_count", null);
    if (str != null);
    while (true)
    {
      try
      {
        int i2 = Integer.parseInt(str);
        i1 = i2;
        return i1;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
      int i1 = 0;
    }
  }

  public static void o(String paramString)
  {
    a("pris_userModifyInfo", paramString);
  }

  public static int p()
  {
    String str = b("anonyumous_subscribe_count", null);
    if (str != null);
    while (true)
    {
      try
      {
        int i2 = Integer.parseInt(str);
        i1 = i2;
        return i1;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
      }
      int i1 = 0;
    }
  }

  public static void p(String paramString)
  {
    a("pris_userModifyIcon", paramString);
  }

  public static String q()
  {
    return b("user_anonymity", null);
  }

  public static void q(String paramString)
  {
    a("pris_userModifyPassword", paramString);
  }

  public static String r()
  {
    return b("pris_login", null);
  }

  public static void r(String paramString)
  {
    a("pris_subList", paramString);
  }

  public static String s()
  {
    return b("pris_coverImage", null);
  }

  public static void s(String paramString)
  {
    a("pris_subRecommend", paramString);
  }

  public static String t()
  {
    return b("pris_shortUrl", null);
  }

  public static void t(String paramString)
  {
    a("pris_subGet", paramString);
  }

  public static String u()
  {
    return b("pris_userGet", null);
  }

  public static void u(String paramString)
  {
    a("pris_subAdd", paramString);
  }

  public static String v()
  {
    return b("pris_userModifyInfo", null);
  }

  public static void v(String paramString)
  {
    a("pris_subDel", paramString);
  }

  public static String w()
  {
    return b("pris_userModifyIcon", null);
  }

  public static void w(String paramString)
  {
    a("pris_subGetSummary", paramString);
  }

  public static String x()
  {
    return b("pris_userModifyPassword", null);
  }

  public static void x(String paramString)
  {
    a("pris_subRefresh", paramString);
  }

  public static String y()
  {
    return b("pris_subList", null);
  }

  public static void y(String paramString)
  {
    a("pris_illegalReport", paramString);
  }

  public static String z()
  {
    return b("pris_subRecommend", null);
  }

  public static void z(String paramString)
  {
    a("pris_infoGet", paramString);
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.b.a
 * JD-Core Version:    0.6.0
 */